#include<stdio.h>
int main()
{
    int m,sg[20],tz[20];
    int i;
    double bz,wm1,wm2;
    scanf("%d",&m);
    for(i=0;i<m;i++)
    {
        scanf("%d%d",&sg[i],&tz[i]);
    }
    for(i=0;i<m;i++)
    {
        bz=(sg[i]-100)*0.9*2;
        wm1=bz-bz*0.1;
        wm2=bz+bz*0.1;
        if(tz[i]<=wm1)
            printf("You are tai shou le!\n");
        else if(tz[i]<wm2)
            printf("You are wan mei!\n");
        else
            printf("You are tai pang le!\n");
    }
    return 0;
}